/*#include "flash.h"

void foo()
{
unsigned int i;
    unsigned int pBuffer[AT91C_IFLASH_PAGE_SIZE / 4];
    unsigned int lastPageAddress;
    volatile unsigned int *pLastPageData;
    
    // Initialize flash driver
    FLASHD_Initialize(BOARD_MCK);

    // Unlock whole flash
    FLASHD_Unlock(AT91C_IFLASH, AT91C_IFLASH + AT91C_IFLASH_SIZE, 0, 0);

    // Performs tests on last page (to avoid overriding existing program).
    lastPageAddress = AT91C_IFLASH + AT91C_IFLASH_SIZE - AT91C_IFLASH_PAGE_SIZE;
    pLastPageData = (volatile unsigned int *) lastPageAddress;

    // Write page with walking bit pattern (0x00000001, 0x00000002, ...)
    for (i=0; i < (AT91C_IFLASH_PAGE_SIZE / 4); i++) {

        pBuffer[i] = 1 << (i % 32);
    }
    FLASHD_Write(lastPageAddress, pBuffer, AT91C_IFLASH_PAGE_SIZE);
    for (i=0; i < (AT91C_IFLASH_PAGE_SIZE / 4); i++) {

        pLastPageData[i];
    }
}*/
